package com.hospital.controller;


import com.hospital.configure.Result;
import com.hospital.entity.Registered;
import com.hospital.service.RegisteredService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author WuLiTing
 * @since 2021-03-28
 */
@RestController
@RequestMapping("/registered")
public class RegisteredController {

    @Autowired
    RegisteredService registeredService;

    /**
     * 添加/修改
     */
    @RequestMapping("/updateRegistered")
    public Result<Registered> updateRegistered(@RequestBody Registered registered) {
        return registeredService.updateRegistered(registered);
    }

    /**
     * 删除
     */
    @RequestMapping("/delRegistered")
    public Result<Registered> delRegistered(@RequestBody Registered registered) {
        return registeredService.delRegistered(registered);
    }

    /**
     * 批量删除
     */
    @RequestMapping("/batchDelRegistered")
    public Result<Registered> batchDelRegistered(@RequestBody Registered registered) {
        return registeredService.batchDelRegistered(registered);
    }

    /**
     * 查询(不分页)
     */
    @RequestMapping("/queryRegistered")
    public Result<Registered> queryRegistered(@RequestBody Registered registered) {
        return registeredService.queryRegistered(registered);
    }

    /**
     * 查询(分页)
     */
    @RequestMapping("/queryRegisteredByPage")
    public Result<Registered> queryRegisteredByPage(@RequestBody Registered registered) {
        return registeredService.queryRegisteredByPage(registered);
    }

    /**
     * 根据ID查询
     */
    @RequestMapping("/queryRegisteredById")
    public Result<Registered> queryRegisteredById(@RequestBody Registered registered) {
        return registeredService.queryRegisteredById(registered);
    }

    /**
     * 查询挂号列表
     */
    @RequestMapping("/queryRegisteredList")
    public Result<Map> queryRegisteredList(@RequestBody Map map){
        return registeredService.queryRegisteredList(map);
    }

    /**
     * 添加挂号信息
     */
    @RequestMapping("/addRegistered")
    public Result<Registered> addRegistered(@RequestBody Map map){
        return registeredService.addRegistered(map);
    }

    /**
     * 线下付款
     */
    @RequestMapping("/registeredPay")
    public Result<Registered> registeredPay(@RequestBody Registered registered){
        return registeredService.registeredPay(registered);
    }

}

